-
Notifications
You must be signed in to change notification settings - Fork 315
Add Otel Metrics configuration keys #9868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🎯 Code Coverage 🔗 Commit SHA: 24185f1 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 2 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 12 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~24185f1081, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1053959
Total [baseline] (8.65 s) : 0, 8649757
Agent [candidate] (1.031 s) : 0, 1031161
Total [candidate] (8.683 s) : 0, 8683099
section iast
Agent [baseline] (1.183 s) : 0, 1183210
Total [baseline] (9.303 s) : 0, 9303183
Agent [candidate] (1.165 s) : 0, 1165042
Total [candidate] (9.404 s) : 0, 9404467
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~24185f1081, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.471 ms) : 0, 1471
crashtracking [candidate] (1.449 ms) : 0, 1449
BytebuddyAgent [baseline] (710.418 ms) : 0, 710418
BytebuddyAgent [candidate] (703.592 ms) : 0, 703592
GlobalTracer [baseline] (246.466 ms) : 0, 246466
GlobalTracer [candidate] (244.854 ms) : 0, 244854
AppSec [baseline] (32.633 ms) : 0, 32633
AppSec [candidate] (32.176 ms) : 0, 32176
Debugger [baseline] (6.42 ms) : 0, 6420
Debugger [candidate] (6.367 ms) : 0, 6367
Remote Config [baseline] (716.103 µs) : 0, 716
Remote Config [candidate] (674.84 µs) : 0, 675
Telemetry [baseline] (12.136 ms) : 0, 12136
Telemetry [candidate] (15.136 ms) : 0, 15136
Flare Poller [baseline] (8.959 ms) : 0, 8959
Flare Poller [candidate] (5.698 ms) : 0, 5698
section iast
crashtracking [baseline] (1.456 ms) : 0, 1456
crashtracking [candidate] (1.454 ms) : 0, 1454
BytebuddyAgent [baseline] (830.404 ms) : 0, 830404
BytebuddyAgent [candidate] (826.542 ms) : 0, 826542
GlobalTracer [baseline] (235.79 ms) : 0, 235790
GlobalTracer [candidate] (234.716 ms) : 0, 234716
AppSec [baseline] (28.052 ms) : 0, 28052
AppSec [candidate] (29.98 ms) : 0, 29980
Debugger [baseline] (6.028 ms) : 0, 6028
Debugger [candidate] (6.117 ms) : 0, 6117
Remote Config [baseline] (608.703 µs) : 0, 609
Remote Config [candidate] (595.562 µs) : 0, 596
Telemetry [baseline] (8.438 ms) : 0, 8438
Telemetry [candidate] (8.457 ms) : 0, 8457
Flare Poller [baseline] (4.147 ms) : 0, 4147
Flare Poller [candidate] (4.172 ms) : 0, 4172
IAST [baseline] (33.742 ms) : 0, 33742
IAST [candidate] (31.725 ms) : 0, 31725
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~24185f1081, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.048 s) : 0, 1047654
Total [baseline] (10.731 s) : 0, 10731057
Agent [candidate] (1.031 s) : 0, 1030774
Total [candidate] (10.772 s) : 0, 10772347
section appsec
Agent [baseline] (1.229 s) : 0, 1228755
Total [baseline] (10.915 s) : 0, 10915434
Agent [candidate] (1.203 s) : 0, 1202563
Total [candidate] (10.856 s) : 0, 10856325
section iast
Agent [baseline] (1.178 s) : 0, 1177663
Total [baseline] (11.134 s) : 0, 11133874
Agent [candidate] (1.16 s) : 0, 1160384
Total [candidate] (11.088 s) : 0, 11088250
section profiling
Agent [baseline] (1.193 s) : 0, 1192903
Total [baseline] (10.912 s) : 0, 10911785
Agent [candidate] (1.171 s) : 0, 1170893
Total [candidate] (10.823 s) : 0, 10823003
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~24185f1081, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.461 ms) : 0, 1461
crashtracking [candidate] (1.446 ms) : 0, 1446
BytebuddyAgent [baseline] (704.547 ms) : 0, 704547
BytebuddyAgent [candidate] (703.113 ms) : 0, 703113
GlobalTracer [baseline] (246.475 ms) : 0, 246475
GlobalTracer [candidate] (244.898 ms) : 0, 244898
AppSec [baseline] (32.686 ms) : 0, 32686
AppSec [candidate] (32.389 ms) : 0, 32389
Debugger [baseline] (6.454 ms) : 0, 6454
Debugger [candidate] (6.372 ms) : 0, 6372
Remote Config [baseline] (724.501 µs) : 0, 725
Remote Config [candidate] (676.925 µs) : 0, 677
Telemetry [baseline] (14.347 ms) : 0, 14347
Telemetry [candidate] (14.935 ms) : 0, 14935
Flare Poller [baseline] (6.374 ms) : 0, 6374
Flare Poller [candidate] (5.802 ms) : 0, 5802
section appsec
crashtracking [baseline] (1.467 ms) : 0, 1467
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (733.77 ms) : 0, 733770
BytebuddyAgent [candidate] (725.596 ms) : 0, 725596
GlobalTracer [baseline] (238.46 ms) : 0, 238460
GlobalTracer [candidate] (236.11 ms) : 0, 236110
AppSec [baseline] (175.791 ms) : 0, 175791
AppSec [candidate] (174.289 ms) : 0, 174289
Debugger [baseline] (6.068 ms) : 0, 6068
Debugger [candidate] (5.928 ms) : 0, 5928
Remote Config [baseline] (657.761 µs) : 0, 658
Remote Config [candidate] (633.283 µs) : 0, 633
Telemetry [baseline] (8.685 ms) : 0, 8685
Telemetry [candidate] (8.418 ms) : 0, 8418
Flare Poller [baseline] (3.97 ms) : 0, 3970
Flare Poller [candidate] (3.858 ms) : 0, 3858
IAST [baseline] (25.014 ms) : 0, 25014
IAST [candidate] (25.072 ms) : 0, 25072
section iast
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.448 ms) : 0, 1448
BytebuddyAgent [baseline] (826.504 ms) : 0, 826504
BytebuddyAgent [candidate] (823.644 ms) : 0, 823644
GlobalTracer [baseline] (234.778 ms) : 0, 234778
GlobalTracer [candidate] (233.483 ms) : 0, 233483
AppSec [baseline] (28.779 ms) : 0, 28779
AppSec [candidate] (28.858 ms) : 0, 28858
Debugger [baseline] (6.049 ms) : 0, 6049
Debugger [candidate] (6.047 ms) : 0, 6047
Remote Config [baseline] (591.741 µs) : 0, 592
Remote Config [candidate] (597.575 µs) : 0, 598
Telemetry [baseline] (8.316 ms) : 0, 8316
Telemetry [candidate] (8.411 ms) : 0, 8411
Flare Poller [baseline] (4.192 ms) : 0, 4192
Flare Poller [candidate] (4.165 ms) : 0, 4165
IAST [baseline] (32.349 ms) : 0, 32349
IAST [candidate] (32.527 ms) : 0, 32527
section profiling
ProfilingAgent [baseline] (110.754 ms) : 0, 110754
ProfilingAgent [candidate] (108.628 ms) : 0, 108628
crashtracking [baseline] (1.455 ms) : 0, 1455
crashtracking [candidate] (1.453 ms) : 0, 1453
BytebuddyAgent [baseline] (729.024 ms) : 0, 729024
BytebuddyAgent [candidate] (724.844 ms) : 0, 724844
GlobalTracer [baseline] (222.082 ms) : 0, 222082
GlobalTracer [candidate] (220.04 ms) : 0, 220040
AppSec [baseline] (32.096 ms) : 0, 32096
AppSec [candidate] (32.256 ms) : 0, 32256
Debugger [baseline] (7.544 ms) : 0, 7544
Debugger [candidate] (12.281 ms) : 0, 12281
Remote Config [baseline] (683.381 µs) : 0, 683
Remote Config [candidate] (1.406 ms) : 0, 1406
Telemetry [baseline] (14.955 ms) : 0, 14955
Telemetry [candidate] (9.949 ms) : 0, 9949
Flare Poller [baseline] (4.265 ms) : 0, 4265
Flare Poller [candidate] (4.139 ms) : 0, 4139
Profiling [baseline] (111.412 ms) : 0, 111412
Profiling [candidate] (109.25 ms) : 0, 109250
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 5 performance regressions! Performance is the same for 5 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~24185f1081, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section baseline
no_agent (1.219 ms) : 1207, 1232
. : milestone, 1219,
iast (3.239 ms) : 3190, 3288
. : milestone, 3239,
iast_FULL (5.729 ms) : 5672, 5786
. : milestone, 5729,
iast_GLOBAL (3.724 ms) : 3660, 3788
. : milestone, 3724,
profiling (1.863 ms) : 1848, 1878
. : milestone, 1863,
tracing (1.809 ms) : 1793, 1825
. : milestone, 1809,
section candidate
no_agent (1.213 ms) : 1202, 1225
. : milestone, 1213,
iast (3.197 ms) : 3153, 3242
. : milestone, 3197,
iast_FULL (5.787 ms) : 5729, 5845
. : milestone, 5787,
iast_GLOBAL (3.565 ms) : 3508, 3621
. : milestone, 3565,
profiling (1.899 ms) : 1882, 1915
. : milestone, 1899,
tracing (1.853 ms) : 1837, 1868
. : milestone, 1853,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~24185f1081, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section baseline
no_agent (19.34 ms) : 19137, 19543
. : milestone, 19340,
appsec (18.53 ms) : 18341, 18718
. : milestone, 18530,
code_origins (18.189 ms) : 18007, 18371
. : milestone, 18189,
iast (18.023 ms) : 17845, 18202
. : milestone, 18023,
profiling (18.905 ms) : 18711, 19098
. : milestone, 18905,
tracing (17.775 ms) : 17599, 17951
. : milestone, 17775,
section candidate
no_agent (18.005 ms) : 17823, 18187
. : milestone, 18005,
appsec (20.398 ms) : 20194, 20602
. : milestone, 20398,
code_origins (19.62 ms) : 19422, 19817
. : milestone, 19620,
iast (19.854 ms) : 19654, 20053
. : milestone, 19854,
profiling (20.774 ms) : 20563, 20984
. : milestone, 20774,
tracing (18.672 ms) : 18481, 18862
. : milestone, 18672,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~24185f1081, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section baseline
no_agent (1.481 ms) : 1469, 1493
. : milestone, 1481,
appsec (2.507 ms) : 2454, 2560
. : milestone, 2507,
iast (2.225 ms) : 2161, 2289
. : milestone, 2225,
iast_GLOBAL (2.255 ms) : 2192, 2319
. : milestone, 2255,
profiling (2.514 ms) : 2342, 2686
. : milestone, 2514,
tracing (2.027 ms) : 1977, 2076
. : milestone, 2027,
section candidate
no_agent (1.481 ms) : 1469, 1492
. : milestone, 1481,
appsec (3.695 ms) : 3478, 3911
. : milestone, 3695,
iast (2.216 ms) : 2152, 2280
. : milestone, 2216,
iast_GLOBAL (2.262 ms) : 2197, 2326
. : milestone, 2262,
profiling (2.063 ms) : 2011, 2114
. : milestone, 2063,
tracing (2.041 ms) : 1991, 2091
. : milestone, 2041,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~24185f1081, baseline=1.56.0-SNAPSHOT~8db72c0988
dateFormat X
axisFormat %s
section baseline
no_agent (15.561 s) : 15561000, 15561000
. : milestone, 15561000,
appsec (14.839 s) : 14839000, 14839000
. : milestone, 14839000,
iast (18.7 s) : 18700000, 18700000
. : milestone, 18700000,
iast_GLOBAL (18.037 s) : 18037000, 18037000
. : milestone, 18037000,
profiling (14.682 s) : 14682000, 14682000
. : milestone, 14682000,
tracing (15.162 s) : 15162000, 15162000
. : milestone, 15162000,
section candidate
no_agent (15.41 s) : 15410000, 15410000
. : milestone, 15410000,
appsec (14.933 s) : 14933000, 14933000
. : milestone, 14933000,
iast (18.425 s) : 18425000, 18425000
. : milestone, 18425000,
iast_GLOBAL (17.975 s) : 17975000, 17975000
. : milestone, 17975000,
profiling (15.752 s) : 15752000, 15752000
. : milestone, 15752000,
tracing (15.427 s) : 15427000, 15427000
. : milestone, 15427000,
|
mhlidd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't have time to review all test files, but I have a general concern about where we should handle OTel configurations. We already have OTelEnvironmentConfigSource, which is effectively sets Datadog Configs as aliases for OTel Configs when DD_TRACE_OTEL_ENABLED=true.
IMO we should handle all OTel configs in one place to have one source of truth, and to me it makes sense to isolate them in OTelEnvironmentConfigSource. WDYT?
dd-trace-api/src/main/java/datadog/trace/api/ConfigDefaults.java
Outdated
Show resolved
Hide resolved
dd-trace-api/src/main/java/datadog/trace/api/ConfigDefaults.java
Outdated
Show resolved
Hide resolved
dd-trace-api/src/main/java/datadog/trace/api/ConfigDefaults.java
Outdated
Show resolved
Hide resolved
| runtimeMetricsEnabled = configProvider.getBoolean(RUNTIME_METRICS_ENABLED, true); | ||
| metricsOtelEnabled = | ||
| configProvider.getBoolean(METRICS_OTEL_ENABLED, DEFAULT_METRICS_OTEL_ENABLED); | ||
| otelResourceAttributes = configProvider.getMergedMap(OTEL_RESOURCE_ATTRIBUTES, '='); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already queried in OtelEnvironmentConfigSource, and it appears that the existing way of handling of this config is slightly more specific than what is happening here.
Do we have a consensus of how we would like to handle this config?
This also brings up a bigger question of whether or not we want to reclassify what OtelEnvironmentConfigSource does. It really is not its own config source, but rather prioritizing OTEL configs instead of their DD equivalents when DD_TRACE_OTEL_ENABLED = true. Should we have all OTEL configs handled in the OtelEnvironmentConfigSource, or should we migrate all of the configs handled there to be handled in Config.java?
IMO, it makes sense to handle all OTel Configs in OtelEnvironmentConfigSource to separate them from regular DD config handling, and to keep the handling of OTel Configs all in one place.
Co-authored-by: mhlidd <[email protected]>
Co-authored-by: mhlidd <[email protected]>
Co-authored-by: mhlidd <[email protected]>
Co-authored-by: mhlidd <[email protected]>
42a2955 to
83d93b9
Compare
…lace known bad characters before converting
83d93b9 to
90ccc7b
Compare
|
I refactored things to introduce (internal) Datadog equivalents of the OTel configuration keys. We now do most of the handling in This also means that we have a way to adjust things if necessary with overrides that apply to Datadog SDKs without affecting any OTel SDKs that might be consuming the same config. I also made enum conversion case-insensitive as well as automatically map invalid characters (currently just Finally I changed the default protocol to be |
What Does This Do
Add the following configuration keys:
dd.metrics.otel.enabledotel.metric.export.intervalotel.metric.export.timeoutotel.exporter.otlp.metrics.endpointotel.exporter.otlp.metrics.headersotel.exporter.otlp.metrics.protocolotel.exporter.otlp.metrics.timeoutotel.exporter.otlp.metrics.temporality.preferenceotel.metrics.exporterThey are not linked to anything yet.
Motivation
OpenTelemetry Metrics API support
Additional Notes